//
//  SingleTon.m
//  mutiThread
//
//  Created by xiaoxiaojia on 17/4/11.
//  Copyright (c) 2017年 admin. All rights reserved.
//

#import "SingleTon.h"
static id _instance = nil;
@implementation SingleTon
+(id)SharedSingleTon{
 return  [[self alloc]init];
}
+(instancetype)allocWithZone:(struct _NSZone *)zone{
	static dispatch_once_t onceToken;
	dispatch_once(&onceToken, ^{
		_instance = [super allocWithZone:zone];
	});
	return _instance;
}
+(instancetype)init{
 static dispatch_once_t onceToken;
	dispatch_once(&onceToken, ^{
		_instance = [super init];
	});
	//width=[UIScreen mainScreen].bounds.size.width;
	return _instance;
}
//copy在底层 会调用copyWithZone:
- (id)copyWithZone:(NSZone *)zone{
	return  _instance;
}
@end
